import createAxiosInstance from '@/axios/request';

const employeesApi = createAxiosInstance('/api/employees')

// 员工相关API
export const employeeApi = {
  // 获取员工列表
  getEmployees: () => {
    return employeesApi.get('/')
  },
  
  // 创建员工
  createEmployee: (data: any) => {
    return employeesApi.post('/', data)
  },
  
  // 批量创建员工
  batchCreateEmployees: (data: any[]) => {
    return employeesApi.post('/batch', data)
  },
  
  // 更新员工信息
  updateEmployee: (id: string, data: any) => {
    return employeesApi.put(`/${id}`, data)
  },
  
  // 删除员工
  deleteEmployee: (id: string) => {
    return employeesApi.delete(`/${id}`)
  }
}